/* Inline mail send arexx script for Aweb (w/ Voodoo Launch Option!) Version 1.0a By Josef Faulkner (panther@gate.net) IRC: Josef Description: ŻŻŻŻŻŻŻŻŻŻŻ This script is a mailto: plugin for Aweb. This script will be run in response to mailto: URLs, and will allow you to either compose a message inside Aweb's GUI and send it, with NO need for any SMTP mailers, or you can Launch Voodoo and let it handle the job. Features: ŻŻŻŻŻŻŻŻŻ o Does not need an external SMTP mail program, does network stuff itself if you have the TCP: network device installed. o Can launch Voodoo instead, and this script will pass it the screenname and address, and fill in a default subject. o Runs transparently. After you install, you don't even know it's there. o Loads your signature into the ') end else do call writeln(1,'') end call writeln(1,'
') call writeln(1,'') call close(1) address AWEB.1 'OPEN file://localhost/'fname end else address command 'RequestChoice "MailToRexx" "Error" "Ok" >NIL:' end else do if open(1,fname,w) then do call open(99,'t:test',w) call writeln(99,addr) call close(99) parse var addr 'address="'touser'" subj="'subj'" data="'otext otext=left(otext,length(otext)-1) otext=replace(otext,'*"','"') otext=replace(otext,'*N',d2c(10)) if myemailaddress='' then do call open(7,'env:username',r) fromid=readln(7) call close(7) call open(7,'env:hostname',r) fromhost=readln(7) call close(7) from=fromid'@'fromhost end else from=myemailaddress data=replace(data,'.'d2c(13),'. 'd2c(13)) if exists('T:SentMail.txt') then call open(10,'T:SentMail.txt',a) else call open(10,'T:SentMail.txt',w) call writeln(10,'From: <'from'>') call writeln(10,'To: 'touser) call writeln(10,'Subject 'subj) call writeln(10,'') call writeln(10,otext) call close(10) if ~showlist(H,'TCP') then address command 'mount TCP: from amitcp:devs/inet-mountlist' if ~showlist(H,'TCP') then address command 'mount TCP:' if showlist(H,'TCP') then do call open(8,'tcp:'smtphost'/25',w) call writeln(8,'HELO') call writeln(8,'MAIL FROM: '||from) call writeln(8,'RCPT TO: '||touser) call writeln(8,'DATA') call writeln(8,'From: <'from'>') call writeln(8,'To: 'touser) call writeln(8,'Subject: 'subj) call writeln(8,'') call writeln(8,otext) call writeln(8,'.') call writeln(8,'QUIT') call close(8) end else do address command 'Requestchoice title="SMTPSend" BODY="Mail NOT sent. *nCouldn''t mount TCP:" GADGETS="Ok" >NIL:' exit end otext=replace(otext,'<','<') otext=replace(otext,'>','>') call writeln(1,'Mail to 'touser'') call writeln(1,'

Mail sent to 'touser':

') call writeln(1,'

'subj'

'otext)
		call writeln(1,'
') call close(1) address AWEB.1 'OPEN file://localhost/'fname end else address command 'Requestchoice title="SMTPSend" BODY="Mail Sent." GADGETS="Ok" >NIL:' end exit REPLACE: procedure parse arg a,b,c d=index(a,b) do while d~=0 a=insert(c,delstr(a,d,length(b)),d-1) d=index(a,b) end return a